﻿package mortal.game.view.common.guide.stepOperater
{
    import com.gengine.resource.*;
    import mortal.component.window.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.view.common.guide.data.*;
    import mortal.mvc.core.*;

    public class AutoGuideLoadResSteper extends Object implements IAutoGuideSteper
    {
        private var _data:AutoGuideData;

        public function AutoGuideLoadResSteper()
        {
            return;
        }// end function

        public function guide(param1:AutoGuideData, param2:Window = null) : void
        {
            this._data = param1;
            LoaderHelp.addResCallBack(param1.guideTypeValue as String, this.loadCompleted);
            return;
        }// end function

        private function loadCompleted() : void
        {
            this.stop(this._data);
            return;
        }// end function

        public function stop(param1:AutoGuideData = null) : void
        {
            if (param1 != null)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.AutoGuideStepEnd, param1));
            }
            return;
        }// end function

    }
}
